<template>
	<view>
		<view class="uni-padding-wrap">
			<view class="page-section swiper">
				<view class="page-section-spacing">
					<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
						<swiper-item v-for="(banner, index) in bannerImg" :key="index">
							<view class="swiper-item">
								<img :src="banner" alt="">
							</view>
						</swiper-item>
					</swiper>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"swiper",
		data() {
			return {
				bannerImg: [
					"../../static/images/banner1.jpg",
					"../../static/images/banner2.jpg",
					"../../static/images/banner3.jpg",
					"../../static/images/banner4.jpg",
					"../../static/images/banner5.jpg",
				],
				indicatorDots: true,
				autoplay: true, //自动播放
				interval: 3000, //停留时间
				duration: 500 //切换时间
			};
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	.swiper{
		width: 100%;
		height: 200px;
		.swiper-item{
			width: 100%;
			height: 100%;
			img{
				width: 100%;
				height: 100%;
			}
		}
	}
</style>
